package com.pinda.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.pinda.auth.search.PdCommonLoginLogSearch;
import com.pinda.commonutils.Page;
import com.pinda.auth.entity.PdCommonLoginLog;
import com.pinda.mapper.PdCommonLoginLogMapper;
import com.pinda.service.IPdCommonLoginLogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 * 登录日志 服务实现类
 * </p>
 *
 * @author 黄杰
 * @since 2023-06-13
 */
@Service
public class PdCommonLoginLogServiceImpl extends ServiceImpl<PdCommonLoginLogMapper, PdCommonLoginLog> implements IPdCommonLoginLogService {

    @Resource
    private PdCommonLoginLogMapper pdCommonLoginLogMapper;
    @Override
    public PageInfo<PdCommonLoginLog> findLoginLogService(Page<PdCommonLoginLogSearch> page) {
        PageHelper.startPage(page.getPageNum(), page.getPageSize());

        return new PageInfo<PdCommonLoginLog>(this.pdCommonLoginLogMapper.selectList(null));
    }
}
